﻿using System.Collections;
using System;
using System.Text;

using GameServer.Managers;
using GameServer.Virtual_Objects.User;
using GameServer.Virtual_Objects.Room;

namespace GameServer.Networking.Packets
{
    class PACKET_ROOM_LIST : Packet
    {
        public PACKET_ROOM_LIST(virtualUser User, int Page)
        {
            newPacket(29184);

            ArrayList Rooms = RoomManager.getRoomsInChannel(User.Channel, Page);

            addBlock(Rooms.Count); //Rooms Count
            addBlock(Page); // Room Page
            addBlock(0);

            foreach (virtualRoom Room in Rooms)
            {
                addRoomInfo(Room);
            }
        }
    }
}
